﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZhouYu.DreamTour.BLL.IService;
using ZhouYu.DreamTour.DAL.IRepository;
using ZhouYu.DreamTour.Model;
using ZhouYu.DreamTour.ViewModel;

namespace ZhouYu.DreamTour.BLL.Service
{
    public class TrafficService: ITrafficService
    {
        private ITrafficRepository _trafficRepository;
        public TrafficService(ITrafficRepository trafficRepository)
        {
            _trafficRepository = trafficRepository;
        }

        #region 获取交通路线信息集合
        /// <summary>
        /// 获取交通路线信息集合
        /// </summary>
        /// <returns></returns>
        public ResponseResult GetRouteInfos(string TranType, string StartAddress, string StopAddress, string CarNumber, out List<RouteInfoSimulation> RouteListone, out List<RouteInfoSimulation> RouteListtwo)
        {
            //创建响应结果类对象
            ResponseResult responseResult = new ResponseResult();
            //调用获取交通路线信息集合
            responseResult.data= _trafficRepository.GetRouteInfos(TranType, StartAddress, StopAddress, CarNumber, out RouteListone, out RouteListtwo);
            return responseResult;
           
            
        }
        #endregion
    }
}
